﻿namespace Sai.Test.TestDataBuilders
{
	using System;
	using Sai.Core;

	public class ProductAssemblyBuilder
	{
		private string name = "TestAssembly.dll";
		private string path = "C:\\Test";
		private DateTime date = DateTime.Today;
		private long size = 1024;
		private string checksum = "abcdefg";

		public static ProductAssemblyBuilder ProductAssembly()
		{
			return new ProductAssemblyBuilder();
		}

		public ProductAssemblyBuilder Named(string name)
		{
			this.name = name;

			return this;
		}

		public ProductAssemblyBuilder InFolder(string path)
		{
			this.path = path;

			return this;
		}

		public ProductAssemblyBuilder WithChecksum(string checksum)
		{
			this.checksum = checksum;

			return this;
		}

		public ProductAssembly Build()
		{
			return new ProductAssembly(
				System.IO.Path.Combine(this.path, this.name), 
				this.date, 
				this.size, 
				this.checksum);
		}
	}
}
